import unittest
import sys
import os

def main ():
    
    names = [i[:-3] for i in os.listdir('./') if i[-8:] == '_test.py']
    
    tests = []
    for name in names:
        mod = __import__(name, globals(), locals(), [''])
        tests.append(unittest.defaultTestLoader.loadTestsFromModule(
                mod))
        sys.modules[name] = mod
    suite = unittest.TestSuite(tests)
    unittest.TextTestRunner().run(suite)

    
if __name__ == '__main__':
    main()
